<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="author" content="wangbo">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>react 第一章</title>
</head>
<body>
    <div id="app" ></div>
    <!-- 顺序有要求 -->
    <script type="text/javascript" src="../js/react.development.js"></script>
    <!-- dom依赖于react.development.js -->
    <script type="text/javascript" src="../js/react-dom.development.js"></script>
    <script type="text/javascript">    
    // 子类也可以包含其他的
    const span = React.createElement('span',{style:{color:"red"}},'span标签')
    const myp = React.createElement('p',{id:'pid'},'我自己定义的p标签',span)
    // 可以添加多个字节点,节点顺序,就是给好的,可以包含,在父类里边并列
    let myh1 = React.createElement('h1',{className:'myclass',style:{color:'green'},name:'myname'},"我是h1",myp,span); 
    ReactDOM.render(myh1,document.getElementById("app"))
    </script>
</body>
</html>